import { request } from "../utils/http.js";  //导入我们封装的请求方法。

//用户资料信息
export const getCustomer = (data) => {
  return request({
    url: `/mine/center/customer`,
    method: "GET",
    data
  })
}
//设置交易密码
export const setTradePassword = (data) => {
  return request({
    url: '/mine/center/setTradePassword',
    method: "PUT",
    data
  })
}
//修改交易密码
export const updateTradePassword = (data) => {
  return request({
    url: '/mine/center/updateTradePassword',
    method: "PUT",
    data
  })
}
// 忘记密码 获取登录手机验证码
export const getSmsCode = (data) => {
  return request({
    url: '/mine/center/sms/code',
    method: "GET",
    data
  })
}
// 短信验证码验证
export const postSmsVerification = (data) => {
  return request({
    url: '/mine/center/sms/verification',
    method: "POST",
    data
  })
}
//通过短信验证 设置交易密码
export const setSmsTradePassword = (data) => {
  return request({
    url: '/mine/center/setSmsTradePassword',
    method: "PUT",
    data
  })
}
// 查询店铺糖果卡详情 适用门店
export const paradiseShopInfo = (data) => {
  return request({
    url: '/shenye/paradise/shop/info',
    method: "GET",
    data
  })
}

// 判断商家数字权益卡 是否上架
export const merchantIsShelves = (data) => {
  return request({
    url: '/equityManager/equityCard/douyin/merchant/isShelves',
    method: "GET",
    data
  })
}

// 订单详情汇总详情
export const orderSummaryDetail = (data) => {
  return request({
    url: '/customer/order/summary/detail',
    method: "GET",
    data
  })
}
// 糖果卡订单 订单使用记录
export const getMerchantEquityCardOrderDetailList = (id) => {
  return request({
    url: `/customer/order/summary/getMerchantEquityCardOrderDetailList/${id}`,
    method: "GET"
  })
}
// H5 赚卡退款申请
export const equityreCardOrderFundApply = (data) => {
  return request({
    url: '/customer/equity/card/order/refund/v1/refund/apply',
    method: "POST",
    data
  })
}
// H5 撤销退款
export const equityreCardOrdeRevokeRefund = (data) => {
  return request({
    url: '/customer/equity/card/order/refund/v1/revokeRefund',
    method: "PUT",
    data
  })
}

// 用户通用订单列表
export const orderSummaryList = (data) => {
  return request({
    url: '/customer/order/summary/list2',
    method: "GET",
    data
  })
}

// 查询商家权益卡使用门店列表
export const equityCardMerchantCardShopList = (data) => {
  return request({
    url: '/equityManager/equityCard/merchant/card/shop/list',
    method: "GET",
    data
  })
}

// 用户资料信息
export const customerInfo = () => {
  return request({
    url: '/mine/center/customer',
    method: "GET"
  })
}

// 头像设置
export const putSetAvatar = (avatar) => {
  return request({
    url: '/mine/center/set/avatar?avatar=' + avatar,
    method: "PUT",
  })
}
// 昵称设置
export const putSetNickName = (nickName) => {
  return request({
    url: '/mine/center/set/nickName?nickName=' + nickName,
    method: "PUT",
  })
}
//查询商家权益核销结果
export const verificationResult = (data) => {
  return request({
    url: '/equity/order/verification/result',
    method: "POST",
    data
  })
}
//神椰订单状态数量统计
export const summaryOrderStatusCount = (data) => {
  return request({
    url: '/customer/order/summary/order/status/count',
    method: "GET",
    data
  })
}
// 用户退出登录
export const customerV1Logout = () => {
  return request({
    url: '/customer/v1/logout',
    method: "POST",
  })
}
// 抖音商城订单详情
export const orderSummaryDyDetail = (data) => {
  return request({
    url: '/customer/order/summary/dy/detail',
    method: "GET",
    data
  })
}
// 抖音商城支付订单
export const orderDyNfrPay = (data) => {
  return request({
    url: '/merchant/equity/order/dy/nfr/pay',
    method: "POST",
    type: 1,
    data
  })
}

// 查询抖音商品去支付详情
export const paradiseShopNfrToPayDyDetail = (data) => {
  return request({
    url: '/shenye/paradise/nfr/to/pay/dy/detail',
    method: "GET",
    data
  })
}

// 抖音商城查询使用记录
export const getDyMerchantEquityCardOrderDetailList = (id) => {
  return request({
    url: `/customer/order/summary/dy/getMerchantEquityCardOrderDetailList/${id}`,
    method: "GET"
  })
}
// 抖音撤销退款
export const dyEquityreCardOrdeRevokeRefund = (data) => {
  return request({
    url: '/customer/equity/card/order/refund/v1/dy/revokeRefund',
    method: "POST",
    data
  })
}
// 抖音商城赚卡退款申请
export const dyEquityreCardOrderFundApply = (data) => {
  return request({
    url: '/customer/equity/card/order/refund/v1/dy/refund/apply',
    method: "POST",
    data
  })
}

//查询我的作品
export const getMyVideoTalentWorks = (data) => {
  return request({
    url: '/douyin/video/my/getMyVideoTalentWorks',
    method: "GET",
    data
  })
}
//查询我的作品收益列表
export const getMyVideoTalentWorksIncomeList = (data) => {
  return request({
    url: '/douyin/video/my/getMyVideoTalentWorksIncomeList',
    method: "GET",
    data
  })
}

//查询我的累计收益和今日收益
export const getMyVideoIncome = () => {
  return request({
    url: '/douyin/video/my/getMyVideoIncome',
    method: "GET",
  })
}

//查询我的作品收益明细
export const getMyWorkIncomeDetails = (id) => {
  return request({
    url: `/douyin/video/my/getMyWorkIncomeDetails/${id}`,
    method: "GET"
  })
}
//查询我的作品收益明细列表
export const getMyWorkIncomeDetailsList = (data) => {
  return request({
    url: `/douyin/video/my/getMyWorkIncomeDetailsList`,
    method: "GET",
    data
  })
}
//查询我的足迹收藏列表
export const getMyCollectVideoList = (data) => {
  return request({
    url: `/douyin/video/my/getMyCollectImageTextList`,
    method: "GET",
    data
  })
}
//查询收藏足迹路线
export const getTrajectory = (worksId) => {
  return request({
    url: `/douyin/video/my/getMyCollectVideoList/${worksId}`,
    method: "GET",
  })
}

// 用户地址列表
export const getAddressList = (data) => {
  return request({
    url: '/mine/center/address/list',
    method: "GET",
    data
  })
}

// 新增 用户地址
export const addAddress = (data) => {
  return request({
    url: '/mine/center/address',
    method: "POST",
    data
  })
}

// H5 编辑 用户地址
export const editAddress = (data) => {
  return request({
    url: '/mine/center/address',
    method: "PUT",
    data
  })
}

// H5 用户地址详情
export const getInfoAddress = (id) => {
  return request({
    url: `/mine/center/address/getInfo/${id}`,
    method: "GET"
  })
}
// H5 设置默认 用户地址
export const setDefault = (id) => {
  return request({
    url: `/mine/center/setDefault/${id}`,
    method: "PUT"
  })
}
// 获取 H5 兑换商品 默认地址
export const getDefaultAddress = () => {
  return request({
    url: `/mine/center/getDefaultAddress`,
    method: "PUT"
  })
}
// 省市区接口
export const getCommonCity = () => {
  return request({
    url: '/common/v1/city',
    method: "GET"
  })
}

// 主播列表
export const getAnchorList = (data) => {
  return request({
    url: '/anchor/member/anchor/list',
    method: "GET",
    data
  })
}

// 订单兑换
export const changeOrder = (data) => {
  return request({
    url: '/anchor/change/order/v1/change',
    method: "POST",
    data
  })
}
// 查询兑换记录
export const getChangeOrderList = (data) => {
  return request({
    url: '/anchor/change/order/v1/list',
    method: "GET",
    data
  })
}

// 主播商品 分页列表
export const getAnchorGoodsList = (data) => {
  return request({
    url: '/anchor/goods/v1/list',
    method: "GET",
    data
  })
}
// 获取 主播商品信息详情
export const getAnchorGoodsDetail = (id) => {
  return request({
    url: `/anchor/goods/v1/detail/${id}`,
    method: "GET",
  })
}

// 兑换商品
export const changeGoods = (data) => {
  return request({
    url: '/anchor/goods/v1/exchange',
    method: "PUT",
    data
  })
}

// 用户持有积分
export const getCustomerIntegral = (data) => {
  return request({
    url: '/anchor/goods/v1/getCustomerIntegral',
    method: "GET",
    data
  })
}

// 主播商品订单 分页列表
export const getGoodsOrderList = (data) => {
  return request({
    url: '/anchor/goods/order/v1/list',
    method: "GET",
    data
  })
}
// 主播商品订单 详情
export const getAnchorGoodsOrderDetail = (id) => {
  return request({
    url: `/anchor/goods/order/v1/detail/${id}`,
    method: "GET",
  })
}
// 确认收货
export const confirmOrder = (data) => {
  return request({
    url: '/anchor/goods/order/v1/confirm',
    method: "PUT",
    data
  })
}